<!DOCTYPE html>
<html style="background: #f3f3f3;">
<head lang="en">
<meta charset="UTF-8">
<meta name='apple-touch-fullscreen' content='yes'>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta content="fullscreen=yes,preventMove=no" name="ML-Config">
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta name="format-detection" content="telephone=no,email=no,address=no"/>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
<title>商学院</title>
<link rel="stylesheet" href="/style/college/css/style.css">
<script src="/style/college/js/style.js"></script>
<style type="text/css">
.pages{width: 100%; height: 1rem; margin: .5rem 0 1rem 0; text-align: center;}
.pages a{color: #f02c25; font-size: .25rem; background: #fff; padding: .1rem .2rem; margin: 0 .1rem;}
.pages a.curr{background: #f02c25; color: #fff;}
</style>
</head>
<body>
<ul class="college-fixed">
    <?php
    if($this->cate['list'])
    {
        foreach($this->cate['list'] as $caid=>$name)
        {

            if($caid == $this->caid)
            {
                $slk = ' class="college-on"';
            }
            else
            {
                $slk = '';
            }
    ?>
    <li style="width:<?=$this->width;?>%;">
        <a href="?caid=<?=$caid;?>"<?=$slk;?>><?=stripslashes($name);?></a>
    </li>
    <?        
        }
    }
    ?>
</ul>
<ul class="college-view">

    <?php
    if($this->data['data'])
    {
        foreach($this->data['data'] as $r)
        {

            if($r['urls']!="")
            {
                $url = stripslashes($r['urls']);
            }
            else
            {
                $url = '/article/show?a=c&id='.$r['article_id'];
            }
    ?>
    <li>
        <div class="college-top">
            <a href="<?=$url;?>">
            <div class="college-top-left">
                <img src="/style/college/images/college1.png" alt="">
                <i><?=stripslashes($r['title']);?></i>
            </div>
            </a>
            <div class="college-top-right">
                <?=date("Y-m-d",$r['add_time']);?>
            </div>
        </div>
        <div class="college-nav">
            <?=stripslashes($r['keywords']);?>
        </div>
        <a href="<?=$url;?>" class="college-link">查看详情 >></a>
    </li>
    <?
        }
    }
    ?>

    
</ul>
<?php
if($this->data['maxpage'] > 1){
?>
<div class="pages">
    <?
    $pquery="?";        
    if($this->data['para']){            
        foreach($this->data['para'] as $k=>$r){             
            $pquery.=$k."=".$r."&";
        }           
    }
    
    if($this->data['page'] > 1) echo '<a href="'.$pquery.'page='.($this->data['page']-1).'">上页</a>';
    for($i = $this->data['spage']['ps']; $i<=$this->data['spage']['pe']; $i++){
    if($i == $this->data['page']) echo '<a href="javascript:void(0);" class="curr">'.$i.'</a>';
    else echo '<a href="'.$pquery.'page='.$i.'">'.$i.'</a>';
    }
    
    if($this->data['page'] < $this->data['maxpage']) echo '<a href="'.$pquery.'page='.($this->data['page']+1).'">下页</a>';
    ?>
</div>
<?
}
?>

<div class="foot-menu">
    <ul class="clearfix">
        <a href="/"><li><i class="ico-7"></i><span>首页</span></li></a>
        <a href="/rcm"><li><i class="ico-1"></i><span>商城</span></li></a>
        <a href="/cart/cart"><li><i class="ico-5"></i><span>购物车</span></li> </a>
        <a href="/college"><li class="on"><i class="ico-8"></i><span>商学院</span></li> </a>
        <a href="/user/index"><li><i class="ico-4"></i><span>我的</span></li> </a>
    </ul>
</div>
</body>
</html>